<script>
export default {
  components: {},
  data () {
    return {
      radio: 0,
      activeName: '1',
    };
  },
  computed: {
    isButtonDisabled() {
      return this.radio === 0;
    }
  },
  methods: {
    check(radio) {
      console.log(radio)
      if (radio === 3) {
        this.$message.success('恭喜你，答对啦！')
      } else {
        this.$message.error('很遗憾，答错啦！')
      }
    },
  }
}
</script>

<template>
  <div>
    <div>
      <h1 align="center">3.4 LLVM</h1>
      <el-divider></el-divider>
      <h3>简介</h3>
      LLVM 是当今炙手可热的编译器基础框架。它从一开始就采用了模块化设计的思想，使得每一个编译阶段都被独立出来，形成了一系列的
      <br>库。LLVM 使用面向对象的 C++ 语言开发，为编译器开发人员提供了易用而丰富的编程接口和 API。
      <h3>初步使用</h3>
      首先我们通过著名的 helloWorld 来熟悉下 LLVM 的使用。
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-c"><span class="com">#include</span><span class="pln"> </span><span class="str">&lt;stdio.h&gt;</span></code></li><li class="L1"><code class="lang-c"><span class="typ">int</span><span class="pln"> main</span><span class="pun">()</span></code></li><li class="L2"><code class="lang-c"><span class="pun">{</span></code></li><li class="L3"><code class="lang-c"><span class="pln">    printf</span><span class="pun">(</span><span class="str">"hello, world\n"</span><span class="pun">);</span></code></li><li class="L4"><code class="lang-c"><span class="pun">}</span></code></li></ol></pre>
      将 C 源码转换成 LLVM 汇编码：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ clang </span><span class="pun">-</span><span class="pln">emit</span><span class="pun">-</span><span class="pln">llvm </span><span class="pun">-</span><span class="pln">S hello</span><span class="pun">.</span><span class="pln">c </span><span class="pun">-</span><span class="pln">o hello</span><span class="pun">.</span><span class="pln">ll</span></code></li></ol></pre>
      生成的 LLVM IR 如下
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pun">;</span><span class="pln"> </span><span class="typ">ModuleID</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="str">'hello.c'</span></code></li><li class="L1"><code class="lang-text"><span class="pln">source_filename </span><span class="pun">=</span><span class="pln"> </span><span class="str">"hello.c"</span></code></li><li class="L2"><code class="lang-text"><span class="pln">target datalayout </span><span class="pun">=</span><span class="pln"> </span><span class="str">"e-m:e-i64:64-f80:128-n8:16:32:64-S128"</span></code></li><li class="L3"><code class="lang-text"><span class="pln">target triple </span><span class="pun">=</span><span class="pln"> </span><span class="str">"x86_64-unknown-linux-gnu"</span></code></li><li class="L4"><code class="lang-text"></code></li><li class="L5"><code class="lang-text"><span class="pun">@.</span><span class="pln">str </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">private</span><span class="pln"> unnamed_addr constant </span><span class="pun">[</span><span class="lit">14</span><span class="pln"> x i8</span><span class="pun">]</span><span class="pln"> c</span><span class="str">"hello, world\0A\00"</span><span class="pun">,</span><span class="pln"> align </span><span class="lit">1</span></code></li><li class="L6"><code class="lang-text"></code></li><li class="L7"><code class="lang-text"><span class="pun">;</span><span class="pln"> </span><span class="typ">Function</span><span class="pln"> </span><span class="typ">Attrs</span><span class="pun">:</span><span class="pln"> noinline nounwind optnone sspstrong uwtable</span></code></li><li class="L8"><code class="lang-text"><span class="pln">define i32 </span><span class="lit">@main</span><span class="pun">()</span><span class="pln"> </span><span class="com">#0 {</span></code></li><li class="L9"><code class="lang-text"><span class="pln">  </span><span class="pun">%</span><span class="lit">1</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> call i32 </span><span class="pun">(</span><span class="pln">i8</span><span class="pun">*,</span><span class="pln"> </span><span class="pun">...)</span><span class="pln"> </span><span class="lit">@printf</span><span class="pun">(</span><span class="pln">i8</span><span class="pun">*</span><span class="pln"> getelementptr inbounds </span><span class="pun">([</span><span class="lit">14</span><span class="pln"> x i8</span><span class="pun">],</span><span class="pln"> </span><span class="pun">[</span><span class="lit">14</span><span class="pln"> x i8</span><span class="pun">]*</span><span class="pln"> </span><span class="pun">@.</span><span class="pln">str</span><span class="pun">,</span><span class="pln"> i32 </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> i32 </span><span class="lit">0</span><span class="pun">))</span></code></li><li class="L0"><code class="lang-text"><span class="pln">  ret i32 </span><span class="lit">0</span></code></li><li class="L1"><code class="lang-text"><span class="pun">}</span></code></li><li class="L2"><code class="lang-text"></code></li><li class="L3"><code class="lang-text"><span class="pln">declare i32 </span><span class="lit">@printf</span><span class="pun">(</span><span class="pln">i8</span><span class="pun">*,</span><span class="pln"> </span><span class="pun">...)</span><span class="pln"> </span><span class="com">#1</span></code></li><li class="L4"><code class="lang-text"></code></li><li class="L5"><code class="lang-text"><span class="pln">attributes </span><span class="com">#0 = { noinline nounwind optnone sspstrong uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }</span></code></li><li class="L6"><code class="lang-text"><span class="pln">attributes </span><span class="com">#1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }</span></code></li><li class="L7"><code class="lang-text"></code></li><li class="L8"><code class="lang-text"><span class="pun">!</span><span class="pln">llvm</span><span class="pun">.</span><span class="kwd">module</span><span class="pun">.</span><span class="pln">flags </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{!</span><span class="lit">0</span><span class="pun">,</span><span class="pln"> </span><span class="pun">!</span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="pun">!</span><span class="lit">2</span><span class="pun">}</span></code></li><li class="L9"><code class="lang-text"><span class="pun">!</span><span class="pln">llvm</span><span class="pun">.</span><span class="pln">ident </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{!</span><span class="lit">3</span><span class="pun">}</span></code></li><li class="L0"><code class="lang-text"></code></li><li class="L1"><code class="lang-text"><span class="pun">!</span><span class="lit">0</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{</span><span class="pln">i32 </span><span class="lit">1</span><span class="pun">,</span><span class="pln"> </span><span class="pun">!</span><span class="str">"wchar_size"</span><span class="pun">,</span><span class="pln"> i32 </span><span class="lit">4</span><span class="pun">}</span></code></li><li class="L2"><code class="lang-text"><span class="pun">!</span><span class="lit">1</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{</span><span class="pln">i32 </span><span class="lit">7</span><span class="pun">,</span><span class="pln"> </span><span class="pun">!</span><span class="str">"PIC Level"</span><span class="pun">,</span><span class="pln"> i32 </span><span class="lit">2</span><span class="pun">}</span></code></li><li class="L3"><code class="lang-text"><span class="pun">!</span><span class="lit">2</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{</span><span class="pln">i32 </span><span class="lit">7</span><span class="pun">,</span><span class="pln"> </span><span class="pun">!</span><span class="str">"PIE Level"</span><span class="pun">,</span><span class="pln"> i32 </span><span class="lit">2</span><span class="pun">}</span></code></li><li class="L4"><code class="lang-text"><span class="pun">!</span><span class="lit">3</span><span class="pln"> </span><span class="pun">=</span><span class="pln"> </span><span class="pun">!{!</span><span class="str">"clang version 5.0.1 (tags/RELEASE_501/final)"</span><span class="pun">}</span></code></li></ol></pre>
      该过程从词法分析开始，将 C 源码分解成 token 流，然后传递给语法分析器，语法分析器在 CFG（上下文无关文法）的指导下将 token
      <br>流组织成 AST（抽象语法树），接下来进行语义分析，检查语义正确性，最后生成 IR。
      <br>LLVM bitcode 有两部分组成：位流，以及将 LLVM IR 编码成位流的编码格式。使用汇编器 llvm-as 将 LLVM IR 转换成 bitcode：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ llvm</span><span class="pun">-</span><span class="kwd">as</span><span class="pln"> hello</span><span class="pun">.</span><span class="pln">ll </span><span class="pun">-</span><span class="pln">o hello</span><span class="pun">.</span><span class="pln">bc</span></code></li></ol></pre>
      结果如下：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ file hello</span><span class="pun">.</span><span class="pln">bc</span></code></li><li class="L1"><code class="lang-text"><span class="pln">hello</span><span class="pun">.</span><span class="pln">bc</span><span class="pun">:</span><span class="pln"> LLVM IR bitcode</span></code></li><li class="L2"><code class="lang-text"><span class="pln">$ xxd </span><span class="pun">-</span><span class="pln">g1 hello</span><span class="pun">.</span><span class="pln">bc </span><span class="pun">|</span><span class="pln"> head </span><span class="pun">-</span><span class="pln">n5</span></code></li><li class="L3"><code class="lang-text"><span class="lit">00000000</span><span class="pun">:</span><span class="pln"> </span><span class="lit">42</span><span class="pln"> </span><span class="lit">43</span><span class="pln"> c0 de </span><span class="lit">35</span><span class="pln"> </span><span class="lit">14</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">05</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">62</span><span class="pln"> </span><span class="lit">0c</span><span class="pln"> </span><span class="lit">30</span><span class="pln"> </span><span class="lit">24</span><span class="pln">  BC</span><span class="pun">..</span><span class="lit">5.</span><span class="pun">......</span><span class="pln">b</span><span class="pun">.</span><span class="lit">0</span><span class="pln">$</span></code></li><li class="L4"><code class="lang-text"><span class="lit">00000010</span><span class="pun">:</span><span class="pln"> </span><span class="lit">49</span><span class="pln"> </span><span class="lit">59</span><span class="pln"> be </span><span class="lit">66</span><span class="pln"> ee d3 </span><span class="lit">7e</span><span class="pln"> </span><span class="lit">2d</span><span class="pln"> </span><span class="lit">44</span><span class="pln"> </span><span class="lit">01</span><span class="pln"> </span><span class="lit">32</span><span class="pln"> </span><span class="lit">05</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln">  IY</span><span class="pun">.</span><span class="pln">f</span><span class="pun">..~-</span><span class="pln">D</span><span class="pun">.</span><span class="lit">2.</span><span class="pun">....</span></code></li><li class="L5"><code class="lang-text"><span class="lit">00000020</span><span class="pun">:</span><span class="pln"> </span><span class="lit">21</span><span class="pln"> </span><span class="lit">0c</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">4d</span><span class="pln"> </span><span class="lit">02</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">0b</span><span class="pln"> </span><span class="lit">02</span><span class="pln"> </span><span class="lit">21</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">02</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln">  </span><span class="pun">!...</span><span class="pln">M</span><span class="pun">.....!.....</span></code></li><li class="L6"><code class="lang-text"><span class="lit">00000030</span><span class="pun">:</span><span class="pln"> </span><span class="lit">13</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">00</span><span class="pln"> </span><span class="lit">07</span><span class="pln"> </span><span class="lit">81</span><span class="pln"> </span><span class="lit">23</span><span class="pln"> </span><span class="lit">91</span><span class="pln"> </span><span class="lit">41</span><span class="pln"> c8 </span><span class="lit">04</span><span class="pln"> </span><span class="lit">49</span><span class="pln"> </span><span class="lit">06</span><span class="pln"> </span><span class="lit">10</span><span class="pln"> </span><span class="lit">32</span><span class="pln"> </span><span class="lit">39</span><span class="pln">  </span><span class="pun">......#.</span><span class="pln">A</span><span class="pun">..</span><span class="pln">I</span><span class="pun">..</span><span class="lit">29</span></code></li><li class="L7"><code class="lang-text"><span class="lit">00000040</span><span class="pun">:</span><span class="pln"> </span><span class="lit">92</span><span class="pln"> </span><span class="lit">01</span><span class="pln"> </span><span class="lit">84</span><span class="pln"> </span><span class="lit">0c</span><span class="pln"> </span><span class="lit">25</span><span class="pln"> </span><span class="lit">05</span><span class="pln"> </span><span class="lit">08</span><span class="pln"> </span><span class="lit">19</span><span class="pln"> </span><span class="lit">1e</span><span class="pln"> </span><span class="lit">04</span><span class="pln"> </span><span class="lit">8b</span><span class="pln"> </span><span class="lit">62</span><span class="pln"> </span><span class="lit">80</span><span class="pln"> </span><span class="lit">10</span><span class="pln"> </span><span class="lit">45</span><span class="pln"> </span><span class="lit">02</span><span class="pln">  </span><span class="pun">....%......</span><span class="pln">b</span><span class="pun">..</span><span class="pln">E</span><span class="pun">.</span></code></li></ol></pre>
      反过来将 bitcode 转回 LLVM IR 也是可以的，使用反汇编器 llvm-dis：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ llvm</span><span class="pun">-</span><span class="pln">dis hello</span><span class="pun">.</span><span class="pln">bc </span><span class="pun">-</span><span class="pln">o hello</span><span class="pun">.</span><span class="pln">ll</span></code></li></ol></pre>
      其实 LLVM 可以利用工具 lli 的即时编译器（JIT）直接执行 bitcode 格式的程序：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ lli hello</span><span class="pun">.</span><span class="pln">bc</span></code></li><li class="L1"><code class="lang-text"><span class="pln">hello</span><span class="pun">,</span><span class="pln"> world</span></code></li></ol></pre>
      接下来使用静态编译器 llc 命令可以将 bitcode 编译为特定架构的汇编语言：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ llc </span><span class="pun">-</span><span class="pln">march</span><span class="pun">=</span><span class="pln">x86</span><span class="pun">-</span><span class="lit">64</span><span class="pln"> hello</span><span class="pun">.</span><span class="pln">bc </span><span class="pun">-</span><span class="pln">o hello</span><span class="pun">.</span><span class="pln">s</span></code></li></ol></pre>
      也可以使用 clang 来生成，结果是一样的：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-text"><span class="pln">$ clang </span><span class="pun">-</span><span class="pln">S hello</span><span class="pun">.</span><span class="pln">bc </span><span class="pun">-</span><span class="pln">o hello</span><span class="pun">.</span><span class="pln">s </span><span class="pun">-</span><span class="pln">fomit</span><span class="pun">-</span><span class="pln">frame</span><span class="pun">-</span><span class="pln">pointer</span></code></li></ol></pre>
      结果如下：
      <pre style="margin-left: 2em;"><ol class="linenums"><li class="L0"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">text</span></code></li><li class="L1"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">file   </span><span class="str">"hello.c"</span></code></li><li class="L2"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">globl  main                    </span><span class="com"># -- Begin function main</span></code></li><li class="L3"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">p2align        </span><span class="lit">4</span><span class="pun">,</span><span class="pln"> </span><span class="lit">0x90</span></code></li><li class="L4"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">type   main</span><span class="pun">,</span><span class="lit">@function</span></code></li><li class="L5"><code class="lang-asm"><span class="pln">main</span><span class="pun">:</span><span class="pln">                                   </span><span class="com"># @main</span></code></li><li class="L6"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">cfi_startproc</span></code></li><li class="L7"><code class="lang-asm"><span class="com"># BB#0:</span></code></li><li class="L8"><code class="lang-asm"><span class="pln">        pushq   </span><span class="pun">%</span><span class="pln">rbp</span></code></li><li class="L9"><code class="lang-asm"><span class="pun">.</span><span class="typ">Lcfi0</span><span class="pun">:</span></code></li><li class="L0"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">cfi_def_cfa_offset </span><span class="lit">16</span></code></li><li class="L1"><code class="lang-asm"><span class="pun">.</span><span class="typ">Lcfi1</span><span class="pun">:</span></code></li><li class="L2"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">cfi_offset </span><span class="pun">%</span><span class="pln">rbp</span><span class="pun">,</span><span class="pln"> </span><span class="pun">-</span><span class="lit">16</span></code></li><li class="L3"><code class="lang-asm"><span class="pln">        movq    </span><span class="pun">%</span><span class="pln">rsp</span><span class="pun">,</span><span class="pln"> </span><span class="pun">%</span><span class="pln">rbp</span></code></li><li class="L4"><code class="lang-asm"><span class="pun">.</span><span class="typ">Lcfi2</span><span class="pun">:</span></code></li><li class="L5"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">cfi_def_cfa_register </span><span class="pun">%</span><span class="pln">rbp</span></code></li><li class="L6"><code class="lang-asm"><span class="pln">        movabsq $</span><span class="pun">.</span><span class="pln">L</span><span class="pun">.</span><span class="pln">str</span><span class="pun">,</span><span class="pln"> </span><span class="pun">%</span><span class="pln">rdi</span></code></li><li class="L7"><code class="lang-asm"><span class="pln">        movb    $0</span><span class="pun">,</span><span class="pln"> </span><span class="pun">%</span><span class="pln">al</span></code></li><li class="L8"><code class="lang-asm"><span class="pln">        callq   printf</span></code></li><li class="L9"><code class="lang-asm"><span class="pln">        xorl    </span><span class="pun">%</span><span class="pln">eax</span><span class="pun">,</span><span class="pln"> </span><span class="pun">%</span><span class="pln">eax</span></code></li><li class="L0"><code class="lang-asm"><span class="pln">        popq    </span><span class="pun">%</span><span class="pln">rbp</span></code></li><li class="L1"><code class="lang-asm"><span class="pln">        retq</span></code></li><li class="L2"><code class="lang-asm"><span class="pun">.</span><span class="typ">Lfunc_end0</span><span class="pun">:</span></code></li><li class="L3"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">size   main</span><span class="pun">,</span><span class="pln"> </span><span class="pun">.</span><span class="typ">Lfunc_end0</span><span class="pun">-</span><span class="pln">main</span></code></li><li class="L4"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">cfi_endproc</span></code></li><li class="L5"><code class="lang-asm"><span class="pln">                                        </span><span class="com"># -- End function</span></code></li><li class="L6"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">type   </span><span class="pun">.</span><span class="pln">L</span><span class="pun">.</span><span class="pln">str</span><span class="pun">,</span><span class="lit">@object</span><span class="pln">          </span><span class="com"># @.str</span></code></li><li class="L7"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">section        </span><span class="pun">.</span><span class="pln">rodata</span><span class="pun">.</span><span class="pln">str1</span><span class="pun">.</span><span class="lit">1</span><span class="pun">,</span><span class="str">"aMS"</span><span class="pun">,</span><span class="lit">@progbits</span><span class="pun">,</span><span class="lit">1</span></code></li><li class="L8"><code class="lang-asm"><span class="pun">.</span><span class="pln">L</span><span class="pun">.</span><span class="pln">str</span><span class="pun">:</span></code></li><li class="L9"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">asciz  </span><span class="str">"hello, world\n"</span></code></li><li class="L0"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">size   </span><span class="pun">.</span><span class="pln">L</span><span class="pun">.</span><span class="pln">str</span><span class="pun">,</span><span class="pln"> </span><span class="lit">14</span></code></li><li class="L1"><code class="lang-asm"></code></li><li class="L2"><code class="lang-asm"></code></li><li class="L3"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">ident  </span><span class="str">"clang version 5.0.1 (tags/RELEASE_501/final)"</span></code></li><li class="L4"><code class="lang-asm"><span class="pln">        </span><span class="pun">.</span><span class="pln">section        </span><span class="str">".note.GNU-stack"</span><span class="pun">,</span><span class="str">""</span><span class="pun">,</span><span class="lit">@progbits</span></code></li></ol></pre>
      <h3>参考资料</h3>
      <ul>
        <li style="margin-left: 2em;"><a href="http://llvm.org/docs/index.html" target="_blank">llvm documentation</a></li>
      </ul>

      <el-divider></el-divider>

      <h3>LLVM（Low-Level Virtual Machine）最初是为了支持哪种编程语言而设计的？</h3>
      <el-radio-group v-model="radio">
        <el-radio :label="1">Java</el-radio>
        <el-radio :label="2">Python</el-radio>
        <el-radio :label="3">C</el-radio>
        <el-radio :label="4">JavaScript</el-radio>
        <el-button type="primary" plain :disabled="isButtonDisabled" @click="check(radio)">检查</el-button>
      </el-radio-group>
    </div>
    <el-divider></el-divider>

  </div>
</template>

<style scoped>

</style>